<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../framework/css/base.css" type="text/css" />
<link rel="stylesheet" href="../framework/css/menu.css" type="text/css" />
<link rel="stylesheet" href="<%=request.getContextPath() %>/framework/plugin/zTree/zTreeStyle/zTreeStyle.css" type="text/css">
<script language="javascript" type="text/javascript" src="../framework/js/jquery-1.6.4.js"></script>
<script language="javascript" type="text/javascript" src="../framework/plugin/zTree/jquery.ztree.core-3.0.js"></script>
<base target="main" />
<script type="text/javascript">

var setting = {
	async: {
		enable: true,
		url:"<%=request.getContextPath()%>/framework/getTreeNodes.action",
		type:"post",
		autoParam:["id=node.id"]
	},
	callback: {
		beforeClick: zTreeBeforeClick,
		onClick: zTreeOnClick
	}
};

function zTreeBeforeClick(treeId, treeNode, clickFlag) {
	alert(aaa);
    return true;
};

function zTreeOnClick(event, treeId, treeNode) {
	window.parent.main.location.href = treeNode.url;
    alert(treeNode.url);
};

$(document).ready(function(){
	$.fn.zTree.init($("#treeDemo"), setting);
});
</script>
</head>
<body>
<table width='99%' height="100%" border='0' cellspacing='0' cellpadding='0'>
<tr>
    <td style='padding-left:3px;padding-top:8px' valign="top">
      <dl class='bitem'>
        <dt><b>菜单</b></dt>
        <dd style='display:block' class='sitem'>
          <ul class='sitemu'>
			<li>
				<ul id="treeDemo" class="ztree"></ul>
			</li>
          </ul>
        </dd>
      </dl>
      </td>
  </tr>
</table>
</body>
</html>